package com.foxshooter.resource;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Context;

import com.sun.jersey.api.view.Viewable;

@Path("/rest")
public class IndexResource {
	
	@GET
	@Path("/index")
	public Viewable index(){
		return new Viewable("/index.jsp");
	}
	
	@GET
	@Path("/two")
	public Viewable two(@Context HttpServletResponse response){
		response.setCharacterEncoding("utf-8");
		Map map = new HashMap();
        map.put("msg", "Hello Msg!");
		return new Viewable("/free.ftl",map);
	}
	
}
